package com.ssm.wzl.service.impl;

import com.ssm.wzl.dao.ItemsMapper;
import com.ssm.wzl.po.Items;
import com.ssm.wzl.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/7/20 0020.
 */
@Service
public class ItemServiceImpl implements ItemService {

    @Autowired
    private ItemsMapper mapper;

    @Override
    public void addList(Items items) throws Exception {
        System.out.println(mapper.insert(items));

    }

    @Override
    public Items findItemById(Integer id) throws Exception {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public void updateItems(Items items) throws Exception {
        mapper.updateByPrimaryKey(items);
    }


}
